package cn.lxb.demo;

import cn.lxb.web.starter.template.AbstractStarter;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * spring-boot-web-template-starter test
 *
 * @author 54lxb
 * @since 2019-11-21
 */
@EnableSwagger2
@SpringBootApplication
@MapperScan("cn.lxb.demo.mapper")
public class DemoApplication extends AbstractStarter {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    @Bean("api-docket")
    public Docket api() {
        return create("demo-api", "cn.lxb.demo.controller");
    }

    @Override
    protected String getServiceTitle() {
        return "spring-boot-web-template-starter test api";
    }

    @Override
    protected String getServiceDescription() {
        return "spring-boot-web-template-starter test api";
    }
}
